home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.n / foreach.n < prev    next >
Text File  |  1995-07-25  |  2KB  |  67 lines

  1.  
  2.  
  3.  
  4.      ffffoooorrrreeeeaaaacccchhhh((((nnnn))))                   TTTTccccllll (((( ))))                   ffffoooorrrreeeeaaaacccchhhh((((nnnn))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           foreach - Iterate over all elements in a list
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           ffffoooorrrreeeeaaaacccchhhh _v_a_r_n_a_m_e _l_i_s_t _b_o_d_y
  15.      _________________________________________________________________
  16.  
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.           In this command _v_a_r_n_a_m_e is the name of a variable, _l_i_s_t is a
  20.           list  of  values  to  assign  to  _v_a_r_n_a_m_e, and _b_o_d_y is a Tcl
  21.           script.  For each element of _l_i_s_t (in  order  from  left  to
  22.           right), ffffoooorrrreeeeaaaacccchhhh assigns the contents of the field to _v_a_r_n_a_m_e
  23.           as if the lllliiiinnnnddddeeeexxxx command had been used to extract the field,
  24.           then  calls  the Tcl interpreter to execute _b_o_d_y.  The bbbbrrrreeeeaaaakkkk
  25.           and ccccoooonnnnttttiiiinnnnuuuueeee statements may be invoked inside _b_o_d_y, with the
  26.           same effect as in the ffffoooorrrr command.  FFFFoooorrrreeeeaaaacccchhhh returns an empty
  27.           string.
  28.  
  29.  
  30.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  31.           foreach, iteration, list, looping
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/17/95)
  64.  
  65.  
  66.  
  67.